<script type="text/javascript" src="${base}/scripts/kcgl/rkshdetail.js"></script>
<div id="rksh_tabs" detail="true" class="easyui-tabs" data-options="fit:true,border:false">
<div title="采购单">
    <table style="width: 99%;margin: 5px" class="tb tab-t t-bor">
        <input type="hidden" id="rksh_id" value="${(rksh.id)!}"/>
        <col width="70px"/>
        <col width=""/>
        <col width="70px"/>
        <col width=""/>
        <col width="70px"/>
        <col width=""/>
        <tr>
            <th>采购单号：</th>
            <td colspan="3">
            ${(rksh.cgdh)!}
            </td>
            <th>采购时间：</th>
            <td>${(rksh.cgsj?date)!}</td>
        </tr>
        <tr>
            <th>采购合同：</th>
            <td>
                <a href="javascript:void(0);" onclick="viewCghtDetail('${(rksh.cght.id)!}');">
                    <span>${(rksh.cght.htbm)!}</span>
                </a>
            </td>
            <th>采购类型：</th>
            <td>
            <#if rksh.cglx?? && rksh.cglx=="cgrk" >采购入库<#else>
                <#if rksh.cglx?? && rksh.cglx=="zddh" >直达到货<#else>
                    <#if rksh.cglx?? && rksh.cglx=="bght">保供采购<#else>
                        统配采购</#if></#if>
            </#if>
            </td>

            <th>供&nbsp;应&nbsp;&nbsp;商：</th>
            <td>
            ${(rksh.gys.jc)!}
            </td>
        </tr>
        <tr>
            <th>发货公司：</th>
            <td>
            ${(rksh.fhgs.qc)!}
            </td>
            <th>发货日期：</th>
            <td>
            ${(rksh.fhrq?date)!}
            </td>
            <th>到货日期：</th>
            <td>
            ${(rksh.jhdhrq?date)!}
            </td>
        </tr>
        <tr>
            <th>到货仓库：</th>
            <td>
            ${(rksh.dzck.mc)!}
            </td>
            <th>承运单位：</th>
            <td>
            ${(rksh.ysdw.qc)!}
            </td>
            <th>承&nbsp;运&nbsp;&nbsp;号：</th>
            <td>
            ${(rksh.cyh)!}
            </td>
        </tr>
      <#--  <tr>
            <th>验收状态：</th>
            <td><#if rksh.sfys?? && rksh.sfys>已验收<#else>未验收</#if></td>
            <th>验&nbsp;收&nbsp;&nbsp;人：</th>
            <td>${(rksh.ysr.xm)!}</td>
            <th>验收时间：</th>
            <td>${(rksh.ysrq?datetime)!}</td>
        </tr>-->
        <tr>
        <#if rksh.cglx?? && rksh.cglx!="zddh" >
            <th>已&nbsp;入&nbsp;&nbsp;库：</th>
            <td>
                <#if rksh.yrk>是<#else>否</#if>
            </td>
            <th>入库时间：</th>
            <td>
            ${(rksh.rksj?datetime)!}
            </td>
            <th>入&nbsp;库&nbsp;&nbsp;人：</th>
            <td>
            ${(rksh.rkr.xm)!}
            </td>
        </#if>
        </tr>
        <tr>
            <th>采购公司：</th>
            <td>
            ${(rksh.cggs.qc)!}
            </td>
            <th>联系电话：</th>
            <td>
            ${(rksh.lxrdh)!}
            </td>
            <th>税率(%)：</th>
            <td>
            <#if rksh.sl??>${(rksh.sl)!}</#if>
            </td>
        </tr>
        <tr>
            <th>申报公司：</th>
            <td>
            ${(rksh.sbgs.jc)!}
            </td>
            <th>申报部门：</th>
            <td>
            ${(rksh.sbbm.qc)!}
            </td>
            <th>申&nbsp;报&nbsp;&nbsp;人：</th>
            <td>
            ${(rksh.sbr.xm)!}
            </td>
        </tr>
    <#if rksh.cglx??&& rksh.cglx=="zddh">
        <tr>
            <th>销售单号：</th>
            <td colspan="3">
            ${(rksh.xsd.xsdh)!}
            </td>
            <th>综合服务费(%)：</th>
            <td>${(rksh.cght.ll)!}</td>
        </tr>
        <tr>
            <th>销售合同：</th>
            <td>
            ${(rksh.xsd.xsht.htbm)!}
            </td>
            <th>客&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;户：</th>
            <td>${(rksh.xsd.kh.jc)!}</td>
            <th>提&nbsp;货&nbsp;&nbsp;人：</th>
            <td>${(rksh.xsd.thr)!}</td>
        </tr>
    </#if>
        <tr>
            <th>状&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;态：</th>
            <td>
            <#if rksh.zt == 'ybc'>已保存<#else><#if rksh.zt == 'ytj'>已提交<#else>已审批</#if></#if>
            </td>
            <th>备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注：</th>
            <td colspan="3">
            ${(rksh.bz)!}
            </td>
        </tr>
        <tr>
            <th>附&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;件：</th>
            <td class="lian" colspan="5">
            <#if rksh.fjList??>
                <#list rksh.fjList as fj>
                    <span class="uploadify-queue-item fileName" style="height:65px;text-align: center;">
                            <a href="${base}/base/fj/downLoadFj?fjId=${fj.id}" class="previewImg"
                               rel="previewImg_${(cght.id)!}" title="${(fj.ccmc)!}"
                               style="display:block;margin: 0 auto;">
                                <img src="${base}/base/fj/downLoadFj?fjId=${fj.id}" width="50" height="50"/>
                            </a>
                        <a href="javascript:void(0);"
                           onclick="window.location.href='${base}/base/fj/downLoadFj?fjId=${fj.id}'">下载
                        </a>
                        </span>
                </#list>
            </#if>
            </td>
        </tr>
        <tr>
            <th>制&nbsp;单&nbsp;&nbsp;人：</th>
            <td>${(rksh.createUser.xm)!}</td>
            <th>制单时间：</th>
            <td>${(rksh.dateCreated?datetime)!}</td>
        </tr>
    </table>
</div>
<div title="采购明细">
    <table id="cgd_cgdmx_table" class="easyui-datagrid" url="${base}/kcgl/rksh/rksh_rkmxDetail?rksh.id=${(rksh.id)!}"
           rownumbers="true" style="width: 1500px" fitColumns="true">
        <thead>
        <tr>
            <th data-options="field:'wzgg.code',width:150,align: 'center'" rowspan="2">新物资编码</th>
            <th data-options="field:'wzgg.name',width:100,align: 'center'" rowspan="2">物资名称</th>
            <th data-options="field:'wzgg.ggxh',width:100,align: 'center'" rowspan="2">规格型号</th>
            <th data-options="field:'cd.z',width:80,align: 'center'" rowspan="2">产地</th>
            <#--<th data-options="field:'dhdStr',width:80,formatter:dhdUpCell,align: 'center'" rowspan="2">到货单</th>-->
            <th colspan="2">开单</th>
            <th data-options="field:'jzfs.z',width:70,align: 'center'" rowspan="2">记重方式</th>
            <th colspan="2">到货</th>
            <th data-options="field:'hsj',width:150,formatter:formatJeForHtml,align: 'right'" rowspan="2">含税单价（元）</th>
            <th data-options="field:'bhsj',width:170,formatter:formatJeForHtml,align: 'right'" rowspan="2">不含税单价（元）</th>
            <th data-options="field:'bz',width:130,align: 'center'" rowspan="2">备注</th>
        </tr>
        <tr>
            <th data-options="field:'js',width:100,align: 'right'">件数</th>
            <th data-options="field:'sbsl',width:150,formatter:formatSlForHtml,align: 'right'">重量</th>
            <th data-options="field:'rkjs',width:100,align: 'right'">件数</th>
            <#--<th data-options="field:'rkjz',width:100,align: 'right'">件重</th>-->
            <th data-options="field:'rksl',width:160,formatter:formatSlForHtml,align: 'right'">重量</th>
        </tr>
        </thead>
    </table>
</div>
<div title="费用明细">
    <table id="cgd_cgdfy_table" class="easyui-datagrid" url="${base}/kcgl/rksh/rksh_cgfy?rksh.id=${(rksh.id)!}"
           rownumbers="true" fit="true" fitColumns="true">
        <thead>
        <tr>
            <th data-options="field:'sydw.qc',width:50,align: 'center'">收益单位</th>
            <th data-options="field:'fylb.fykmjc',width:40,align: 'center'">费用类别</th>
            <th data-options="field:'jfsl',width:45,formatter:formatSlForHtml,align: 'right'">计费重量</th>
            <th data-options="field:'dj',width:45,formatter:formatJeForHtml,align: 'right'">单价（元）</th>
            <th data-options="field:'je',width:45,formatter:formatJeForHtml,align: 'right'">总金额（元）</th>
            <th data-options="field:'bz',width:35,align: 'center'">备注</th>
        </tr>
        </thead>
    </table>
</div>
<#--<div title="到货单明细">
    <table id="rksh_dhdmx_table">
    </table>
</div>-->
<div title="采购单打印">
    <div id="rkshdetail-toolbar">
        <div class="PTools">
            <ul class="niu">
                <li><span class="xuan">选择打印机：</span>
                    <select class="ze" name="" style="">
                        <option>——默认——</option>
                    </select>
                </li>
                <li><a class="she" href="javascript:void(0);" onclick="rksh_detail_checkIsInstall()">检查插件</a></li>
                <li><a class="watch" href="javascript:void(0);" onclick="rksh_detail_printPreview()">打印</a></li>
            <#--<li><a class="pen" href="javascript:void(0);" onclick="rksh_detail_print()">打印</a></li>-->
            </ul>
        </div>
        <div id="rkshdydetail_id">
            <object id="RKSH_LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0>
                <embed id="RKSH_LODOP_EM" type="application/x-print-lodop" width=0 height=0
                       pluginspage="install_lodop32.exe"></embed>
            </object>
            <div id="rkshdetail_print_id" class="textcon">
                <table class="tb" style="width: 100%;font-size:13px;">
                    <colgroup>
                        <col width="10%;"/>
                        <col width="25%"/>
                        <col width="15%;"/>
                        <col width="20%"/>
                        <col width="12%;"/>
                        <col width="23%"/>
                    </colgroup>
                    <tbody>
                    <tr>
                        <th>收货单位:</th>
                        <td><input class="input-tian" readonly="readonly"
                                   value="${(rksh.cggs.qc)!}"/></td>
                        <td rowspan="3" colspan="2" style="text-align: center;font-size: 18px">${(rksh.cggs.jc)!}
                            采购单(送货-收条)
                        </td>
                        <th>送货单编号:</th>
                        <td><input class="input-tian" readonly="readonly"
                                   value="${(rksh.cgdh)!}"/></td>
                    </tr>
                    <tr>
                        <th>入库日期:</th>
                        <td><input class="input-tian" readonly="readonly"
                                   value="<#if rksh??>${(rksh.rksj?date)!}</#if>"/></td>
                        <th>制单日期:</th>
                        <td><input class="input-tian" readonly="readonly"
                                   value="<#if rksh??>${(rksh.dateCreated?date)!}</#if>"/></td>
                    </tr>
                    <tr>
                        <th>供货单位:</th>
                        <td><input class="input-tian" readonly="readonly"
                                   value="${(rksh.gys.qc)!}"/></td>
                        <th>要求送货日期:</th>
                        <td><input class="input-tian" readonly="readonly"
                                   value="${(rksh.jhdhrq?date)!}"/></td>
                    </tr>
                    </tbody>
                </table>
            </div>

            <div id="rkshdetail_rksh_id" class="textcon"></div>
            <div id="rkshdy_print_end" class="textcon">
                <table class="tb" style="width: 100%;font-size:13px;">
                    <colgroup>
                        <col width="10%;"/>
                        <col width="20%"/>
                        <col width="10%;"/>
                        <col width="20%"/>
                        <col width="10%;"/>
                        <col width="20%"/>
                    </colgroup>
                    <tbody>
                    <tr>
                        <th style="font-size: 12px;">制&nbsp;单&nbsp;人:</th>
                        <td>
                            <input class="input-tian" readonly="readonly"
                                   value="<#if rksh??>${(rksh.createUser.xm)!}<#else></#if>"/>
                        </td>
                        <th style="font-size: 12px;">收&nbsp;货&nbsp;人:</th>
                        <td>
                            <input class="input-tian" readonly="readonly"
                                   value="<#if rksh??>${(rksh.rkr.xm)!}<#else></#if>"/>
                        </td>
                        <th style="font-size: 12px;">验&nbsp;收&nbsp;组:</th>
                        <td>
                            <input class="input-tian" readonly="readonly"
                                   value="<#if rksh??>${(rksh.ysr.xm)!}<#else></#if>"/>
                        </td>
                    <#--<th>负责人签字:</th>-->
                    <#--<td>-->
                    <#--<input class="input-tian" readonly="readonly"/>-->
                    <#--</td>-->
                    </tr>
                    <tr>
                        <th style="font-size: 12px;">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注:</th>
                        <td colspan="7">
                            <input class="input-tian" readonly="readonly"/>
                        </td>
                    </tr>
                    <tr>
                        <th></th>
                        <td colspan="7"><span
                                style="margin-left: 400px;">${(CurrentTime?string('yyyy-MM-dd HH:mm:ss'))!}</span></td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
</div>